﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ICodeGeneratorProfile.cs" company="Data Ductus Malmö">
//   (c) 2010 - 2012 Data Ductus Malmö AB
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace DataDuctus.Snmp.Persistor.Core.CodeGen
{
  using DataDuctus.Snmp.Persistor.Core.Schema;

  /// <summary>
  /// The CodeGeneratorProfile interface.
  /// </summary>
  public interface ICodeGeneratorProfile
  {
    #region Public Properties

    /// <summary>
    /// Gets the code generator factory.
    /// </summary>
    ICodeGeneratorFactory CodeGeneratorFactory { get; }

    #endregion

    #region Public Methods and Operators

    /// <summary>
    /// The generate class name.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.String.
    /// </returns>
    string GenerateClassName(ISchemaItem item, ICodeGenerator codeGenerator);

    /// <summary>
    /// The generate field name.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <returns>
    /// The System.String.
    /// </returns>
    string GenerateFieldName(ISchemaItem item);

    /// <summary>
    /// The generate namespace.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.String.
    /// </returns>
    string GenerateNamespace(ISchemaItem item, ICodeGenerator codeGenerator);

    /// <summary>
    /// The generate property name.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.String.
    /// </returns>
    string GeneratePropertyName(ISchemaItem item, ICodeGenerator codeGenerator);

    /// <summary>
    /// The generate property type name.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.String.
    /// </returns>
    string GeneratePropertyTypeName(ISchemaItem item, ICodeGenerator codeGenerator);

    /// <summary>
    /// The is auto property.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.Boolean.
    /// </returns>
    bool IsAutoProperty(ISchemaItem item, ICodeGenerator codeGenerator);

    /// <summary>
    /// The is foreign key.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="entry">
    /// The entry.
    /// </param>
    /// <param name="table">
    /// The table.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.Boolean.
    /// </returns>
    bool IsForeignKey(ISchemaItem item, ISchemaItem entry, ISchemaItem table, ICodeGenerator codeGenerator);

    /// <summary>
    /// The is index column.
    /// </summary>
    /// <param name="item">
    /// The item.
    /// </param>
    /// <param name="entry">
    /// The entry.
    /// </param>
    /// <param name="table">
    /// The table.
    /// </param>
    /// <param name="codeGenerator">
    /// The code generator.
    /// </param>
    /// <returns>
    /// The System.Boolean.
    /// </returns>
    bool IsIndexColumn(ISchemaItem item, ISchemaItem entry, ISchemaItem table, ICodeGenerator codeGenerator);

    #endregion
  }
}